package com.ourteam.product.model.domain;

import net.dao.IDataPopulateCallback;

import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

import java.util.HashMap;

/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Tue Nov 07 10:29:34 IRKT 2017
 * Auto Generate Date : 2017-11-15 14:52:59
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import java.util.Map;


public class ProductModelServiceBean implements java.io.Serializable {
    private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

    static {
        mappedDaoFields.put("id",
            com.ourteam.product.model.dao.IProductModelServiceDAO.Id);

        mappedDaoFields.put("objectId",
            com.ourteam.product.model.dao.IProductModelServiceDAO.ObjectId);

        mappedDaoFields.put("serviceCode",
            com.ourteam.product.model.dao.IProductModelServiceDAO.ServiceCode);

        mappedDaoFields.put("serviceName",
            com.ourteam.product.model.dao.IProductModelServiceDAO.ServiceName);

        mappedDaoFields.put("status",
            com.ourteam.product.model.dao.IProductModelServiceDAO.Status);

        mappedDaoFields.put("remarks",
            com.ourteam.product.model.dao.IProductModelServiceDAO.Remarks);

        mappedDaoFields.put("objectName",
            com.ourteam.product.model.dao.IProductModelServiceDAO.ObjectName);

        mappedDaoFields.put("objectCode",
            com.ourteam.product.model.dao.IProductModelServiceDAO.ObjectCode);

        mappedDaoFields.put("objectType",
            com.ourteam.product.model.dao.IProductModelServiceDAO.ObjectType);

        mappedDaoFields.put("objectStatus",
            com.ourteam.product.model.dao.IProductModelServiceDAO.ObjectStatus);

        mappedDaoFields.put("canTest",
            com.ourteam.product.model.dao.IProductModelServiceDAO.CanTest);

        mappedDaoFields.put("submitterId",
            com.ourteam.product.model.dao.IProductModelServiceDAO.SubmitterId);

        mappedDaoFields.put("creatorName",
            com.ourteam.product.model.dao.IProductModelServiceDAO.CreatorName);

        mappedDaoFields.put("createTime",
            com.ourteam.product.model.dao.IProductModelServiceDAO.CreateTime);

        mappedDaoFields.put("lastModifierName",
            com.ourteam.product.model.dao.IProductModelServiceDAO.LastModifierName);

        mappedDaoFields.put("lastModifyTime",
            com.ourteam.product.model.dao.IProductModelServiceDAO.LastModifyTime);
    }

    private com.ourteam.product.model.dao.ProductModelService productModelService;

    public ProductModelServiceBean() {
        super();

        this.productModelService = new com.ourteam.product.model.dao.ProductModelService();
    }

    public ProductModelServiceBean(
        com.ourteam.product.model.dao.ProductModelService productModelService) {
        super();

        this.productModelService = productModelService;
    }

    protected BeanMap getBeanMap() {
        return new BeanMap(productModelService);
    }

    public static String getMappedDAOField(String aAttrName) {
        return mappedDaoFields.get(aAttrName);
    }

    public com.ourteam.product.model.dao.ProductModelService convertToProductModelService() {
        return this.productModelService;
    }

    public com.ourteam.product.model.dao.ProductModelService convertTo() {
        return this.productModelService;
    }

    /**
     * Get id
     *
     * @return long
     */
    public long getId() {
        return (long) this.productModelService.getId();
    }

    /**
     * Set id
     *
     * @parameter long
     */
    public void setId(long id) {
        this.productModelService.setId(id);
    }

    /**
     * Get objectId
     *
     * @return long
     */
    public long getObjectId() {
        return (long) this.productModelService.getObjectId();
    }

    /**
     * Set objectId
     *
     * @parameter long
     */
    public void setObjectId(long objectId) {
        this.productModelService.setObjectId(objectId);
    }

    /**
     * Get serviceCode
     *
     * @return String
     */
    public String getServiceCode() {
        return (String) this.productModelService.getServiceCode();
    }

    /**
     * Set serviceCode
     *
     * @parameter String
     */
    public void setServiceCode(String serviceCode) {
        this.productModelService.setServiceCode(serviceCode);
    }

    /**
     * Get serviceName
     *
     * @return String
     */
    public String getServiceName() {
        return (String) this.productModelService.getServiceName();
    }

    /**
     * Set serviceName
     *
     * @parameter String
     */
    public void setServiceName(String serviceName) {
        this.productModelService.setServiceName(serviceName);
    }

    /**
     * Get status
     *
     * @return String
     */
    public String getStatus() {
        return (String) this.productModelService.getStatus();
    }

    /**
     * Set status
     *
     * @parameter String
     */
    public void setStatus(String status) {
        this.productModelService.setStatus(status);
    }

    /**
     * Get remarks
     *
     * @return String
     */
    public String getRemarks() {
        return (String) this.productModelService.getRemarks();
    }

    /**
     * Set remarks
     *
     * @parameter String
     */
    public void setRemarks(String remarks) {
        this.productModelService.setRemarks(remarks);
    }

    /**
     * Get objectName
     *
     * @return String
     */
    public String getObjectName() {
        return (String) this.productModelService.getObjectName();
    }

    /**
     * Get objectCode
     *
     * @return String
     */
    public String getObjectCode() {
        return (String) this.productModelService.getObjectCode();
    }

    /**
     * Get objectType
     *
     * @return String
     */
    public String getObjectType() {
        return (String) this.productModelService.getObjectType();
    }

    /**
     * Get objectStatus
     *
     * @return String
     */
    public String getObjectStatus() {
        return (String) this.productModelService.getObjectStatus();
    }

    /**
     * Get canTest
     *
     * @return String
     */
    public String getCanTest() {
        return (String) this.productModelService.getCanTest();
    }

    /**
     * Set canTest
     *
     * @parameter String
     */
    public void setCanTest(String canTest) {
        this.productModelService.setCanTest(canTest);
    }

    /**
     * Get submitterId
     *
     * @return long
     */
    public long getSubmitterId() {
        return (long) this.productModelService.getSubmitterId();
    }

    /**
     * Set submitterId
     *
     * @parameter long
     */
    public void setSubmitterId(long submitterId) {
        this.productModelService.setSubmitterId(submitterId);
    }

    /**
     * Get creatorName
     *
     * @return String
     */
    public String getCreatorName() {
        return (String) this.productModelService.getCreatorName();
    }

    /**
     * Set creatorName
     *
     * @parameter String
     */
    public void setCreatorName(String creatorName) {
        this.productModelService.setCreatorName(creatorName);
    }

    /**
     * Get createTime
     *
     * @return java.util.Date
     */
    public java.util.Date getCreateTime() {
        return (java.util.Date) this.productModelService.getCreateTime();
    }

    /**
     * Set createTime
     *
     * @parameter java.util.Date
     */
    public void setCreateTime(java.util.Date createTime) {
        this.productModelService.setCreateTime(createTime);
    }

    /**
     * Get lastModifierName
     *
     * @return String
     */
    public String getLastModifierName() {
        return (String) this.productModelService.getLastModifierName();
    }

    /**
     * Set lastModifierName
     *
     * @parameter String
     */
    public void setLastModifierName(String lastModifierName) {
        this.productModelService.setLastModifierName(lastModifierName);
    }

    /**
     * Get lastModifyTime
     *
     * @return java.util.Date
     */
    public java.util.Date getLastModifyTime() {
        return (java.util.Date) this.productModelService.getLastModifyTime();
    }

    /**
     * Set lastModifyTime
     *
     * @parameter java.util.Date
     */
    public void setLastModifyTime(java.util.Date lastModifyTime) {
        this.productModelService.setLastModifyTime(lastModifyTime);
    }

    public int hashCode() {
        return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
    }

    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof ProductModelServiceBean) == false) {
            return false;
        } // end if

        ProductModelServiceBean other = (ProductModelServiceBean) obj;

        boolean isEqual = false;

        com.ourteam.product.model.dao.ProductModelService tempProductModelService =
            other.convertToProductModelService();

        if ((tempProductModelService == null) ||
                (this.productModelService == null)) {
            isEqual = false;
        } else if ((tempProductModelService == this.productModelService) ||
                tempProductModelService.equals(this.productModelService)) {
            isEqual = true;
        } else {
            isEqual = false;
        }

        return isEqual;
    }

    public static ProductModelServiceBean[] toArray(
        com.ourteam.product.model.dao.ProductModelService[] aProductModelServices) {
        return toArray(aProductModelServices, null);
    }

    public static ProductModelServiceBean[] toArray(
        com.ourteam.product.model.dao.ProductModelService[] aProductModelServices,
        IDataPopulateCallback aCallBack) {
        if (ArrayUtils.isEmpty(aProductModelServices)) {
            return new ProductModelServiceBean[0];
        }

        int length = aProductModelServices.length;

        ProductModelServiceBean[] beans = new ProductModelServiceBean[length];

        for (int i = 0; i < length; i++) {
            beans[i] = new ProductModelServiceBean(aProductModelServices[i]);

            if (aCallBack != null) {
                aCallBack.populate(beans[i],
                    new Object[] { aProductModelServices[i] });
            }
        }

        return beans;
    }
}
